package com.service.impl;


import com.dao.ints.AdminMapper;
import com.dao.ints.FlightMapper;
import com.dao.ints.OrderTicketMapper;
import com.dao.ints.UserInfoMapper;
import com.entity.*;
import com.service.Queryables;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

    @Service
public class Queryableimpl implements Queryables {



        private AdminMapper adminMapper;
        @Autowired
        public void setAdminMapper(AdminMapper adminMapper) {
            this.adminMapper = adminMapper;
        }

        private FlightMapper flightMapper;
        @Autowired
        public void setFlightMapper(FlightMapper flightMapper) {
            this.flightMapper = flightMapper;
        }

     private OrderTicketMapper orderTicketMapper;
         @Autowired
        public void setOrderTicketMapper(OrderTicketMapper orderTicketMapper) {
            this.orderTicketMapper = orderTicketMapper;
        }

        private UserInfoMapper userInfoMapper;
        @Autowired
        public void setUserInfoMapper(UserInfoMapper userInfoMapper) {
            this.userInfoMapper = userInfoMapper;
        }

        public  List<Flight>  Query(){
        List<Flight>  flights  =  flightMapper.listFlight();
         return flights;
        }

        public  List<OrderTicket>  QueryDingDong(){
            List<OrderTicket>  flightList  =  orderTicketMapper.listOrderTicket1();
            return flightList;
        }


        public UserInfo uses(String staffId){
          UserInfo userInfo   =  userInfoMapper.getUser(staffId);
             return userInfo;
        }


         public  Admin  admins  (String staff){
            Admin admin  =  adminMapper.oneAdmin(staff);
            return  admin;
         }















}
